package lab02.test11;

public class Square extends Rectangle {

    //方法：求对角线长
    double diagonal(){
        return (Math.sqrt(longth*longth*2));
    }

    @Override
    public void printMyWay() {
        System.out.println(diagonal());
    }
}
